<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<!-- <script src="https://unpkg.com/vue@next"></script> -->
		<script src="js/v2.6.10/vue.js"></script>
	</head>
	<body>
		<div id="app">
			<h2>去除空格</h2>
			<input type="text" v-model="context" />
			<h2>{{ context | type }}</h2>
		</div>
		<script>
			var i =  new Vue({
		    el: "#app",
			data: {
			    context: "",
			},
			filters: {
				type: function(value){
					return value.split(" ").join('')
				}
			}
		})
		</script>
	</body>
</html>
